Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $("div").click(function(event){ alert("Event handler 1 executed"); event.stopImmediatePropagation(); }); $("div").click(function(event){ alert("Event handler 2 executed"); }); $("div").click(function(event){ alert("Event handler 3 executed"); }); }); </script> </head> <body> <div style="height:100px;width:300px;padding:10px;border:1px solid blue;background-color:lightblue;">Click on this div element.</div> <p>The second and third click event will not be executed due to event.stopImmediatePropagation(). Try to erase this method and see what happens. </body> <!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_event_stopimmediateprop by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:14:38 GMT --> </html>
Result:
Try it Yourself - © w3schools.com